package com.zzyweb.demomp.aop;

import com.zzyweb.demomp.service.UserService;
import com.zzyweb.demomp.utils.ResultObject;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author zhiyi
 * @date 9/9/25
 **/
@Aspect
@Component
public class LogInAop {
    /*@Autowired
    UserService userService;
    @Before("execution(* com.zzyweb.demomp.controller.UserController.logIn(..))")
    public void logInValidation(JoinPoint joinPoint) {
        Object[] args = joinPoint.getArgs();
        String username = args[0].toString();
        String password = args[1].toString();
        if (userService.login(username,password) == null) {
            throw new RuntimeException("账号或者密码错误");
        }
    }*/
}
